<template>
  <div class="tool-menu">
    <el-tooltip class="item" effect="dark" content="刷新布局" placement="left">
      <span class="el-icon-s-open tool-item" @click="resetLayout" />
    </el-tooltip>
    <el-tooltip class="item" effect="dark" content="复位" placement="left">
      <span class="el-icon-s-help tool-item" @click="resetCenter" />
    </el-tooltip>
    <el-tooltip class="item" effect="dark" content="全屏" placement="left">
      <span class="el-icon-full-screen tool-item" @click="fullScreen" />
    </el-tooltip>
    <el-tooltip class="item" effect="dark" content="取消全屏" placement="left">
      <span class="el-icon-aim tool-item" @click="closeScreen" />
    </el-tooltip>
  </div>
</template>

<script>
export default {
  name: 'ToolMenu',
  methods: {
    resetLayout() {
      this.$emit('resetLayout')
    },
    resetCenter() {
      this.$emit('resetCenter')
    },
    fullScreen() {
      this.$emit('fullScreen')
    },
    closeScreen() {
      this.$emit('closeScreen')
    }
  }
}
</script>

<style scoped >
.tool-menu{
  position: absolute;
  bottom: 220px;
  right: 10px;
}
.tool-item{
  margin-bottom: 6px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
  padding: 6px;
  border-radius: 2px;
  font-size: 14px;
  cursor: pointer;
  display: block;
  background: #ffffff;
  transition: color 0.2s;
  font-weight: bold;
}
.tool-item:hover{
  color: #1E90FF;
}
</style>
